Imports System.IO
Public Class frmMoveBookmark

    Private Sub frmMoveBookmark_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        cmbFolders.Items.Clear()
        LoadFoldersComboBox(FavoritesFolder, cmbFolders)
    End Sub

    Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
        If frmMain.trvBookmarks.SelectedNode.Name.EndsWith("url") Then
            AccessBookmarks.MoveBookmark(frmMain.trvBookmarks.SelectedNode.Name, FavoritesFolder & cmbFolders.SelectedItem & "\" & frmMain.trvBookmarks.SelectedNode.Text & ".url")
        Else : AccessBookmarks.MoveFolder(frmMain.trvBookmarks.SelectedNode.Name, FavoritesFolder & cmbFolders.SelectedItem & frmMain.trvBookmarks.SelectedNode.Text)
        End If
        AccessBookmarks.GetDirectoryStructure(FavoritesFolder)
        LoadBookmarks(frmMain.trvBookmarks)
        Me.Close()
    End Sub

    Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click
        Me.Close()
    End Sub
End Class